#include "mainscene.h"
#include "ui_mainscene.h"
#include <QPainter>
#include<QLabel>
#include<QPushButton>
#include<string>
#include<iostream>
#include<QDebug>
#include<QKeyEvent>
#include <QPainter>
#include <stdlib.h>
#include <time.h>
#include<QMediaPlayer>
#include<QDialog>
#include<QMessageBox>
#include<QTimerEvent>
//全局
#define ZOOM 1

#define POINT 100

int X,Y;
int nowTime = 0,steps=0;
int timerId;
MainScene::MainScene(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainScene)
{

    ui->setupUi(this);
    //退出
    connect(ui->actiontuic,&QAction::triggered,[=](){
        this->close();
    });
    //新游戏
    connect(ui->actiond,&QAction::triggered,[=](){
        this->CreatNewGame();
    });
    //开发者信息
    connect(ui->action1_2,&QAction::triggered,[=]{
        QMessageBox::information(this,"开发者信息","开发者:2111792 张钧瑞");
    });
    //游戏说明
    connect(ui->action1,&QAction::triggered,[=](){
        QMessageBox::information(this,"游戏说明","按“↑”、“↓”、“←”、“→”对空白方块进行操作");
    });
    this->setFixedSize(480*ZOOM,640*ZOOM);
    this->setWindowIcon(QPixmap(":/game/MNLS.png"));
    this->setWindowTitle("拼图");
    //打印输出框